import request from "@/utils/http_request";
import { MenuDto, MenuForm } from "./types/menu.dto";
//获取路由及权限
export const getInfo = (data: MenuDto) => {
  return request({
    url: "/system/menu/my_info",
    data,
    method: "get",
  });
};

//新增菜单
export const addMenu = (data: MenuForm) => {
  return request({
    url: "/system/menu/create",
    data,
    method: "post",
  });
};

//获取菜单列表
export const getMenuList = () => {
  return request({
    url: "/system/menu/list",
    method: "get",
    loading: false,
  });
};
